import axios from './http'

export default {
    //用户相关 api
    login: function(params) {
        return axios({
            url: "/user/login",
            method: 'post',
            data: params
        });
    },
    register: function(params) {
        return axios({
            url: "/user/register",
            method: 'post',
            data: params
        });
    },
    updateInfo: function(params) {
        return axios({
            url: "/user/updateInfo",
            method: 'post',
            data: params
        });
    },
    delete: function(params) {
        return axios({
            url: "/user/delete",
            method: 'post',
            params
        });
    },
    selectList: function(params) {
        return axios({
            url: "/user/selectList",
            method: 'get',
            params
        });
    },


    getUserInfoById: function(params) {
        return axios({
            url: "/user/getUserInfoById",
            method: 'get',
            params
        });
    },

    loginOut: function(params) {
        return axios({
            url: "/user/loginOut",
            method: 'get',
            params
        });
    },

    //blog api
    insertBlogOne: function(params) {
        return axios({
            url: "blog/insertBlogOne",
            method: 'post',
            data: params
        });
    },

    getBlogTagVoPage: function(params) {
        return axios({
            url: "blog/getBlogTagVo",
            method: 'get',
            params
        });
    },


    deleteBlogOne: function(params) {
        return axios({
            url: "blog/deleteBlogOne",
            method: 'post',
            params
        });
    },
    /*    selectByIdOne: function(params) {
            return axios({
                url: "blog/selectByIdOne",
                method: 'post',
                params
            });
        },*/



    updateOne: function(params) {
        return axios({
            url: "blog/updateOne",
            method: 'post',
            data: params
        });
    },




    getBlogTagVoById: function(params) {
        return axios({
            url: "blog/getBlogTagVoById",
            method: 'get',
            params
        });
    },


    deleteByTagId: function(params) {
        return axios({
            url: "blogTag/deleteByTagId",
            method: 'post',
            params
        });
    },


    //user blog
    deleteUserById: function(params) {
        return axios({
            url: "userBlog/deleteUserById",
            method: 'post',
            params
        });
    },

    insertUserBlog: function(params) {
        return axios({
            url: "userBlog/insertUserBlog",
            method: 'post',
            data: params
        });
    },

    //tag
    selectTag: function(params) {
        return axios({
            url: "tag/selectTag",
            method: 'get',
            data: params
        });
    },


    insertTag: function(params) {
        return axios({
            url: "tag/insertTag",
            method: 'post',
            data: params
        });
    },

    deleteTag: function(params) {
        return axios({
            url: "tag/deleteTag",
            method: 'post',
            params
        });
    },

    updateTag: function(params) {
        return axios({
            url: "tag/updateTag",
            method: 'post',
            data: params
        });
    },

    //tag blog
    insertBlogTag: function(params) {
        return axios({
            url: "blogTag/insertBlogTag",
            method: 'post',
            data: params
        });
    },
}